/**   
 * @Title: AtomicExample1.java 
 * @Package com.liumm.concurrently.example.atomic 
 * @Description: TODO
 * @author liumm   
 * @date 2018年4月18日 下午10:04:08 
 * @version V1.0   
 */
package com.liumm.concurrently.example.atomic;

import java.util.concurrent.atomic.AtomicReference;

import com.liumm.concurrently.annoations.ThreadSafe;

import lombok.extern.slf4j.Slf4j;

/** 
 * @ClassName: AtomicExample1 
 * @Description: TODO
 * @author liumm 
 * @date 2018年4月18日 下午10:04:08 
 *  
 */

@Slf4j
@ThreadSafe
public class AtomicExample4 {

	private static AtomicReference<Integer> count = new AtomicReference<Integer>(0);

	public static void main(String[] args) {
		count.compareAndSet(0, 100);
		count.compareAndSet(50, 200);
		count.compareAndSet(100, 300);
		count.compareAndSet(150, 400);
		System.out.println(count.get());
	}

}
